 /*
 * @description: 辅助空白组件
 * @Author: along
 * @Date: 2020-09-08
 * @Last Modified by: along
 * @Last Modified time: 2020-09-10
 */
<template>
    <div
        class="blank"
        @click="emitEvent(4)"
        :style="{height: baseconfig.style.height / 2 + 'px', background: baseconfig.style.backgroundColor}"
    />
</template>

<script>
export default {
    name: 'Blank',
    props: {
        baseconfig: {
            type: Object,
            default: () => {}
        },
        index: {//存在多个相同组件,查询当前位置
            type: Number,
            default: () => {}
        }
    },
    data () {
        return {

        };
    },
    watch: {

    },
    filters: {

    },
    methods: {
        /**
         * @description 点击组件，向上级传递点击类型
         */
        emitEvent (type) {
            this.$emit('emit', {
                type: type,//组件类型
                index: this.index//组件位置
            });
        }
    }
};
</script>

<style lang="less" scoped>
.blank {
    width: 375px;
    height: 20px;
    &:hover {
        border: 1px dashed #1890FF;
    }
}
</style>